<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>选课列表</title>
    <link href="${base}/resources/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${base}/resources/js/jquery.js"></script>
    <script type="text/javascript" src="${base}/resources/js/jquery.tools.js"></script>
    <script type="text/javascript" src="${base}/resources/js/jquery.lSelect.js"></script>
    <script type="text/javascript" src="${base}/resources/js/jquery.validate.js"></script>
    <script type="text/javascript" src="${base}/resources/js/common.js"></script>
    <script type="text/javascript" src="${base}/resources/js/input.js"></script>
    <script type="text/javascript" src="${base}/resources/datePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        $().ready(function () {
            $inputForm = $("#inputForm")
            // 表单验证
            $inputForm.validate({
                rules: {
                    name: {
                        required: true,
                        minlength: 4,
                        maxlength: 16,
                    },
                    simpleName: {
                        required: true
                    },
                    code:{
                        required:true
                    }
                }
            });
        });

    </script>
</head>
<body>
<div class="path">
    <a href="${base}/common/index.jhtml">首页</a> &raquo; 选课
</div>

<form id="inputForm" action="/student/selectCourse.html" method="post" enctype="multipart/form-data">
    </div>
    <input type="hidden" value="" name="id" id="id"/>
        <br>
        <table id="listTable" class="list">
            <tr>
                <th class="check">
                    <input type="checkbox" id="selectAll"/>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="no">课程编号</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="name">课程名</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="credit">学分</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="type">课程类型</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="teacher">任课教师</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="classroom_no">教室编号</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="place">上课地点</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="place">选课</a>
                </th>
            </tr>
[#list stu as student]
    <tr>
        <td>
            <input type="checkbox" name="ids" value="${student.id}"/>
        </td>
        <td>
    ${student.course_no}
    </td>
        <td>
        ${student.course_name}
        </td>
        <td>
        ${student.credit}
        </td>
        <td>
            [#if (student.course_type!0) == 1]必修课[/#if]
            [#if (student.course_type!0) == 2]选修课[/#if]
        </td>
        <td>
        ${student.classroom_no}
        </td>
        <td>
        ${student.name}
        </td>
        <td>
        ${student.place}
        </td>
        <td>
            <a href="/student/save.do?id=${student.id}&&courseNo=${student.course_no}">[选课]</a>
        </td>
    </tr>
[/#list]
</form>
</body>
</html>